#include<bits/stdc++.h>
using namespace std;
int a[100005],n,mina,k;
int b[100005];
int main()
{
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	sort(a,a+n);
	for(int i=mina+1;i<n;i++)
	{
		if(a[i]>a[mina]&&b[i]==0)
		{
			mina++;
			b[i]=1;
			//i=mina;
		}
	}
	cout<<n-mina;
	return 0;
}
